<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数</title>
    <style>
        *{margin: 0;padding: 0;list-style-type: none;}
    </style>
</head>
<body>
    <div id="box1">不是洛璃</div>
    <div id="box2">点击一下</div>
    <script>
        let eleDiv1 = document.getElementById("box1")
        let eleBtn = document.querySelector("#box2")
        //事件监听(监听我身上发生的点击行为)
        eleBtn.onclick = function(){
            console.log(1008611)
        }
        eleDiv1.style.color = "skyblue"
        function a(){
            console.log(1);
            console.log(2);
            console.log(3);
            // 代码块
        }
        /*
            关键字：function 声明函数
        */

        //执行函数  直接调用即可
        a()
    </script>
</body>
</html>